<!-- 小程序配置页 -->
<template>
  <a-card
    style="width: 100%"
    :tab-list="tabListNoTitle"
    :active-tab-key="titleKey"
    @tabChange="(key) => onTabChange(key)"
    :bordered="false"
    class="br-10"
  >
    <div v-if="titleKey === 'banner'">
      <Banner :terminalType="1" :selectType="0" />
    </div>
    <div v-else-if="titleKey === 'type'">
      <TypeSet :type="0" :selectType="1" />
    </div>
    <div v-else-if="titleKey === 'group'">
      <GroupSet :type="5" :selectType="4" />
    </div>
    <div v-else-if="titleKey === 'management'">
      <Management />
    </div>
    <div v-else-if="titleKey === 'tabbar'">
      <Tabbar :type="1" :selectType="2" />
    </div>
    <div v-else-if="titleKey === 'peopleSet'">
      <PeopleSet />
    </div>
    <div v-else-if="titleKey === 'marketingConfig'">
      <MarketingConfig />
    </div>
  </a-card>
</template>

<script>
import Banner from '../../components/banner'
import TypeSet from '../../components/menuConfig'
import GroupSet from '../../components/menuConfig'
import Tabbar from '../../components/menuConfig'
import Management from './components/management'
import PeopleSet from './components/peopleSet'
import MarketingConfig from './components/marketingConfig'
export default {
  components: {
    MarketingConfig,
    Banner,
    TypeSet,
    GroupSet,
    Tabbar,
    Management,
    PeopleSet,
  },
  data() {
    return {
      tabListNoTitle: [
        {
          key: 'banner',
          tab: '轮播图',
        },
        {
          key: 'type',
          tab: '分类设置',
        },
        {
          key: 'group',
          tab: '分组设置',
        },
        {
          key: 'management',
          tab: '资讯设置',
        },
        {
          key: 'tabbar',
          tab: '底部菜单栏',
        },
        {
          key: 'peopleSet',
          tab: '人脉设置',
        },
        {
          key: 'marketingConfig',
          tab: '营销配置',
        },
      ],
      titleKey: 'banner',
    }
  },
  computed: {},
  watch: {},
  methods: {
    onTabChange(key) {
      this.titleKey = key
    },
  },
  created() {},
  mounted() {},
}
</script>
<style scoped>
</style>